add support for dynamic formats (#1005)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Mon, 20 Feb 2023 15:05:24 +0000 (08:05 -0700)
committerGitHub <noreply@github.com>
Mon, 20 Feb 2023 15:05:24 +0000 (08:05 -0700)
commit34f9c21aa96f0660d126c428b6f58654556a5148
tree5262c65f3660ca6e9c50a66f278e91cda49c22fb
parent83fa3f851d99fd4f27fe9671a4cde08ebc695ad5
add support for dynamic formats (#1005)

* de-duplicate format setup in find_vec

* create a class to pass format info pack and forth from vecs.

This simplifies re-initialization of a format, which main already
did in a few cases.

The operator overloads for the format info class make the transition
simplier.

* return empty braced init list from find_vecs when not found.

* dynamic format checkpoint.

* delete static GeoFormat instance.

* support dynamic xcsv format.

allow dynamic formats to use rd_init, rd_deinit, wr_init, wr_denint.
This makes conversion to dynamic formats easier as we can, but aren't
forced to move the old init/deinit code.
Often rd/wr_init is intertwined with rd/wr_posn_init.

use dynamic xcsv format.
fix undiscovered bug releated to option order. We assumed an order
of -i -f -o -F, but -i -o -f -F can cause errors if both formats
are style based.
test for above bug added to iblue747.test.

* add missing reference

* use template for format factories.

* correct vecs includes

* fix another filename parameter for positional args issue.

* make Vecs::prepare_format static.

* move prepare_format call to just before xxx_init

for both static and dynamic formats.
format.h
garmin.cc
geo.cc
geo.h
main.cc
reference/track/iblue747~csv.csv [new file with mode: 0644]
testo.d/geo.test
testo.d/iblue747.test
vecs.cc
vecs.h
xcsv.h